package com.zhangxu.microservice.system.web.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zhangxu.microservice.system.dao.enums.RoleStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 角色响应
 */
@Data
@Schema(description = "角色信息")
public class RoleResp {

    @Schema(description = "角色ID", example = "1")
    private Long id;

    @Schema(description = "角色名称", example = "管理员")
    private String name;

    @Schema(description = "角色编码", example = "ADMIN")
    private String code;

    @Schema(description = "应用ID", example = "1")
    private Long appId;

    @Schema(description = "应用编码", example = "SYSTEM")
    private String appCode;

    @Schema(description = "应用名称", example = "系统管理")
    private String appName;

    @Schema(description = "角色描述", example = "系统管理员角色")
    private String description;

    @Schema(description = "状态（ENABLE-启用，DISABLE-禁用）", example = "ENABLE")
    private RoleStatusEnum status;

    @Schema(description = "创建时间", example = "2023-01-01 12:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private LocalDateTime createTime;

    @Schema(description = "更新时间", example = "2023-01-01 12:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private LocalDateTime updateTime;
}